/*
 * =====================================================================================
 *
 *       Filename:  weather_station.cpp
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  10/03/2010 12:35:57 AM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Ken Chen (Ziliang), zlchen.ken@gmail.com
 *        Company:  EMC
 *
 * =====================================================================================
 */

#include "weather_station.h"
#include "alarm_clock.h"
#include "station_toolkit.h"
#include "toolkit_factory.h"

WeatherStation::WeatherStation( std::string tkName )
	: itsName( tkName )
{
  StationToolkit *st = ToolkitFactory::instatnce->createToolkit();
	AlarmClock *ac = new AlarmClock( st );
	itsTS = new TemperatureSensor( ac, st );
	itsBPS = new BarometricPressureSensor( ac, st );
	itsBPT = new BarometricPressureTrend( bps );
}

WeatherStation::~WeatherStation()
{
	// delete all senseor, TBD...
}

void WeatherStation::addTempObserver( Observer* o )
{
	itsTS->addObserver( o );
}

void WeatherStation::addBPObserver( Observer* o )
{
	itsBPS->addObserver( o );
}

void WeatherStation::addBPTObserver( Observer* o )
{
	itsBPT->addObserver( o );
}

